<?php
// no direct access
	defined('_JEXEC') or die;
	require_once JPATH_SITE . '/components/com_content/helpers/route.php';

	$link = "";
	switch ($params->get("link_type")) {
		case 0:
			$link = $params->get("url");
			break;
		case 1:
			$link = JRoute::_(ContentHelperRoute::getCategoryRoute($params->get("catid")));
			break;
		case 2:
			$link = JRoute::_(ContentHelperRoute::getArticleRoute($params->get("articleid")));
			break;
		case 3:
			$item = JFactory::getApplication()->getMenu()->getItem($params->get("menuitem"));
			$link = JRoute::_($item->link . "&Itemid=" . $item->id);
			break;

	}
?>
<div class="padding-10" onMouseOver="this.style.cursor='pointer'"
     onClick="parent.location='<?php echo $link; ?>'">
    <table cellpadding="4" cellspacing="0" border="0" class="main-table" width="340">
        <tr class="header">
            <th><h2><?php echo $module->title;?></h2></th>
        </tr>
        <tr>
            <td style="text-align: center">
                <img src="<?php echo $params->get('image');?>" border="0"/>
            </td>
        </tr>
    </table>
</div>
